<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: arm_compute::utility Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.05</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="namespaces.xhtml"><span>Namespace&#160;List</span></a></li>
      <li><a href="namespacemembers.xhtml"><span>Namespace&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('namespacearm__compute_1_1utility.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">arm_compute::utility Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacearm__compute_1_1utility_1_1detail"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility_1_1detail.xhtml">detail</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab7c665e19081aef1a68ec0090b4c7be6"><td class="memTemplParams" colspan="2">template&lt;std::size_t N, typename Iterator &gt; </td></tr>
<tr class="memitem:ab7c665e19081aef1a68ec0090b4c7be6"><td class="memTemplItemLeft" align="right" valign="top">std::array&lt; typename std::iterator_traits&lt; <a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a> &gt;::value_type, N &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#ab7c665e19081aef1a68ec0090b4c7be6">make_array</a> (<a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a> first, <a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a> last)</td></tr>
<tr class="separator:ab7c665e19081aef1a68ec0090b4c7be6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12c3c62f510452805c289e180ec78bb7"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a12c3c62f510452805c289e180ec78bb7"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a> (const T &amp;n, const T &amp;lower, const T &amp;upper)</td></tr>
<tr class="memdesc:a12c3c62f510452805c289e180ec78bb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs clamping among a lower and upper value.  <a href="#a12c3c62f510452805c289e180ec78bb7">More...</a><br /></td></tr>
<tr class="separator:a12c3c62f510452805c289e180ec78bb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a067ebd28103d827b6ec17032e2344064"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
<tr class="memitem:a067ebd28103d827b6ec17032e2344064"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#a067ebd28103d827b6ec17032e2344064">for_each</a> (F &amp;&amp;)</td></tr>
<tr class="memdesc:a067ebd28103d827b6ec17032e2344064"><td class="mdescLeft">&#160;</td><td class="mdescRight">Base case of for_each.  <a href="#a067ebd28103d827b6ec17032e2344064">More...</a><br /></td></tr>
<tr class="separator:a067ebd28103d827b6ec17032e2344064"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9abd222389b46fd918cd07673c1d836d"><td class="memTemplParams" colspan="2">template&lt;typename F , typename T , typename... Ts&gt; </td></tr>
<tr class="memitem:a9abd222389b46fd918cd07673c1d836d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#a9abd222389b46fd918cd07673c1d836d">for_each</a> (F &amp;&amp;func, T &amp;&amp;arg, Ts &amp;&amp;...args)</td></tr>
<tr class="memdesc:a9abd222389b46fd918cd07673c1d836d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Call the function for each of the arguments.  <a href="#a9abd222389b46fd918cd07673c1d836d">More...</a><br /></td></tr>
<tr class="separator:a9abd222389b46fd918cd07673c1d836d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a043270c1f50c73bf9f91fcc4570ccf0c"><td class="memTemplParams" colspan="2">template&lt;typename F , typename T &gt; </td></tr>
<tr class="memitem:a043270c1f50c73bf9f91fcc4570ccf0c"><td class="memTemplItemLeft" align="right" valign="top">T &amp;&amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#a043270c1f50c73bf9f91fcc4570ccf0c">foldl</a> (F &amp;&amp;, T &amp;&amp;value)</td></tr>
<tr class="memdesc:a043270c1f50c73bf9f91fcc4570ccf0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Base case of foldl.  <a href="#a043270c1f50c73bf9f91fcc4570ccf0c">More...</a><br /></td></tr>
<tr class="separator:a043270c1f50c73bf9f91fcc4570ccf0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9092f01a5deb8985e310f346ea81774"><td class="memTemplParams" colspan="2">template&lt;typename F , typename T , typename U , typename... Us&gt; </td></tr>
<tr class="memitem:af9092f01a5deb8985e310f346ea81774"><td class="memTemplItemLeft" align="right" valign="top">auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#af9092f01a5deb8985e310f346ea81774">foldl</a> (F &amp;&amp;func, T &amp;&amp;initial, U &amp;&amp;value, Us &amp;&amp;...values) -&gt; decltype(func(std::forward&lt; T &gt;(initial), std::forward&lt; U &gt;(value)))</td></tr>
<tr class="memdesc:af9092f01a5deb8985e310f346ea81774"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fold left.  <a href="#af9092f01a5deb8985e310f346ea81774">More...</a><br /></td></tr>
<tr class="separator:af9092f01a5deb8985e310f346ea81774"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26bf8243169fc3fd2299024c25b0aa0d"><td class="memTemplParams" colspan="2">template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:a26bf8243169fc3fd2299024c25b0aa0d"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#a26bf8243169fc3fd2299024c25b0aa0d">saturate_cast</a> (U val)</td></tr>
<tr class="memdesc:a26bf8243169fc3fd2299024c25b0aa0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type cast with saturation.  <a href="#a26bf8243169fc3fd2299024c25b0aa0d">More...</a><br /></td></tr>
<tr class="separator:a26bf8243169fc3fd2299024c25b0aa0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c1a72cd100958036bb59f0625f0613f"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a0c1a72cd100958036bb59f0625f0613f"><td class="memTemplItemLeft" align="right" valign="top">std::vector&lt; size_t &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#a0c1a72cd100958036bb59f0625f0613f">sort_indices</a> (const std::vector&lt; T &gt; &amp;v)</td></tr>
<tr class="memdesc:a0c1a72cd100958036bb59f0625f0613f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform an index sort of a given vector.  <a href="#a0c1a72cd100958036bb59f0625f0613f">More...</a><br /></td></tr>
<tr class="separator:a0c1a72cd100958036bb59f0625f0613f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8ea4e861e5782f66a5a90588e7cf904"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1utility.xhtml#aa8ea4e861e5782f66a5a90588e7cf904">endswith</a> (const std::string &amp;filename, const std::string &amp;suffix)</td></tr>
<tr class="separator:aa8ea4e861e5782f66a5a90588e7cf904"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a12c3c62f510452805c289e180ec78bb7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T arm_compute::utility::clamp </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>lower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>upper</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Performs clamping among a lower and upper value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Value to clamp. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">lower</td><td>Lower threshold. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">upper</td><td>Upper threshold.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Clamped value. </dd></dl>

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00084">84</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">arm_compute::test::fixed_point_arithmetic::detail::min()</a>.</p>

<p>Referenced by <a class="el" href="warp__helpers_8h_source.xhtml#l00034">clamp_to_border_with_size()</a>, <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00123">roi_pooling_layer()</a>, and <a class="el" href="_utility_8h_source.xhtml#l00140">saturate_cast()</a>.</p>
<div class="fragment"><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;{</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(lower, <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(n, upper));</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00897">FixedPoint.h:897</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">FixedPoint.h:902</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa8ea4e861e5782f66a5a90588e7cf904"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool arm_compute::utility::endswith </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>suffix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00168">168</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>Referenced by <a class="el" href="_graph_utils_8h_source.xhtml#l00299">arm_compute::graph_utils::get_input_accessor()</a>.</p>
<div class="fragment"><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;{</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="keywordflow">if</span>(filename.size() &lt; suffix.size())</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    {</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    }</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keywordflow">return</span> std::equal(suffix.rbegin(), suffix.rend(), filename.rbegin());</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a043270c1f50c73bf9f91fcc4570ccf0c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T&amp;&amp; arm_compute::utility::foldl </td>
          <td>(</td>
          <td class="paramtype">F &amp;&amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Base case of foldl. </p>
<dl class="section return"><dt>Returns</dt><dd>value. </dd></dl>

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00113">113</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>References <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::U</a>.</p>

<p>Referenced by <a class="el" href="_utility_8h_source.xhtml#l00126">foldl()</a>, and <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml#l00469">arm_compute::intersect_valid_regions()</a>.</p>
<div class="fragment"><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;{</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">return</span> std::forward&lt;T&gt;(value);</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af9092f01a5deb8985e310f346ea81774"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">auto arm_compute::utility::foldl </td>
          <td>(</td>
          <td class="paramtype">F &amp;&amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>initial</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">U &amp;&amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Us &amp;&amp;...&#160;</td>
          <td class="paramname"><em>values</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> -&gt; decltype(func(std::forward&lt;T&gt;(initial), std::forward&lt;U&gt;(value)))
</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Fold left. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Function to be called </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">initial</td><td>Initial value </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>Argument passed to the function </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">values</td><td>Remaining arguments </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00126">126</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>References <a class="el" href="_utility_8h_source.xhtml#l00113">foldl()</a>.</p>
<div class="fragment"><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;{</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1utility.xhtml#af9092f01a5deb8985e310f346ea81774">foldl</a>(std::forward&lt;F&gt;(func), func(std::forward&lt;T&gt;(initial), std::forward&lt;U&gt;(value)), std::forward&lt;Us&gt;(values)...);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1utility_xhtml_af9092f01a5deb8985e310f346ea81774"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#af9092f01a5deb8985e310f346ea81774">arm_compute::utility::foldl</a></div><div class="ttdeci">auto foldl(F &amp;&amp;func, T &amp;&amp;initial, U &amp;&amp;value, Us &amp;&amp;...values) -&gt; decltype(func(std::forward&lt; T &gt;(initial), std::forward&lt; U &gt;(value)))</div><div class="ttdoc">Fold left. </div><div class="ttdef"><b>Definition:</b> <a href="_utility_8h_source.xhtml#l00126">Utility.h:126</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a067ebd28103d827b6ec17032e2344064"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void arm_compute::utility::for_each </td>
          <td>(</td>
          <td class="paramtype">F &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Base case of for_each. </p>
<p>Does nothing. </p>

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00091">91</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>Referenced by <a class="el" href="_layers_8h_source.xhtml#l00446">BranchLayer::BranchLayer()</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00196">TensorShape::broadcast_shape()</a>, <a class="el" href="_i_tensor_info_8h_source.xhtml#l00260">ITensorInfo::broadcast_shape_and_valid_region()</a>, <a class="el" href="_utility_8h_source.xhtml#l00102">for_each()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00032">arm_compute::pixel_area_c1u8_clamp()</a>, <a class="el" href="_framework_8cpp_source.xhtml#l00143">Framework::print_test_info()</a>, and <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml#l00368">arm_compute::update_window_and_padding()</a>.</p>
<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;{</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9abd222389b46fd918cd07673c1d836d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void arm_compute::utility::for_each </td>
          <td>(</td>
          <td class="paramtype">F &amp;&amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Ts &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Call the function for each of the arguments. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Function to be called </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Argument passed to the function </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Remaining arguments </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00102">102</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>References <a class="el" href="_utility_8h_source.xhtml#l00091">for_each()</a>.</p>
<div class="fragment"><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;{</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    func(std::forward&lt;T&gt;(arg));</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <a class="code" href="namespacearm__compute_1_1utility.xhtml#a9abd222389b46fd918cd07673c1d836d">for_each</a>(std::forward&lt;F&gt;(func), std::forward&lt;Ts&gt;(args)...);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1utility_xhtml_a9abd222389b46fd918cd07673c1d836d"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#a9abd222389b46fd918cd07673c1d836d">arm_compute::utility::for_each</a></div><div class="ttdeci">void for_each(F &amp;&amp;func, T &amp;&amp;arg, Ts &amp;&amp;...args)</div><div class="ttdoc">Call the function for each of the arguments. </div><div class="ttdef"><b>Definition:</b> <a href="_utility_8h_source.xhtml#l00102">Utility.h:102</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab7c665e19081aef1a68ec0090b4c7be6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::array&lt;typename std::iterator_traits&lt;<a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a>&gt;::value_type, N&gt; arm_compute::utility::make_array </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a>&#160;</td>
          <td class="paramname"><em>first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a>&#160;</td>
          <td class="paramname"><em>last</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00070">70</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>References <a class="el" href="_utility_8h_source.xhtml#l00063">arm_compute::utility::detail::make_array()</a>.</p>
<div class="fragment"><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;{</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1utility.xhtml#ab7c665e19081aef1a68ec0090b4c7be6">detail::make_array</a>(first, index_sequence_t&lt;N&gt; {});</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1utility_xhtml_ab7c665e19081aef1a68ec0090b4c7be6"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#ab7c665e19081aef1a68ec0090b4c7be6">arm_compute::utility::make_array</a></div><div class="ttdeci">std::array&lt; typename std::iterator_traits&lt; Iterator &gt;::value_type, N &gt; make_array(Iterator first, Iterator last)</div><div class="ttdef"><b>Definition:</b> <a href="_utility_8h_source.xhtml#l00070">Utility.h:70</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a26bf8243169fc3fd2299024c25b0aa0d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">T arm_compute::utility::saturate_cast </td>
          <td>(</td>
          <td class="paramtype">U&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type cast with saturation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>Value of type U to cast.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Original value clamped to numeric limits of T and converted to type T.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Numeric limits of T must be representable without loss in type U. </dd></dl>

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00140">140</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>References <a class="el" href="_utility_8h_source.xhtml#l00084">clamp()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">arm_compute::test::fixed_point_arithmetic::detail::max()</a>.</p>

<p>Referenced by <a class="el" href="_fixed_point_8inl_source.xhtml#l00091">arm_compute::sqadd_qs16()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00100">arm_compute::sqadd_qs32()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00082">arm_compute::sqadd_qs8()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00389">arm_compute::sqcvt_qs16_f32()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00378">arm_compute::sqcvt_qs8_f32()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00395">arm_compute::sqmovn_qs16()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00401">arm_compute::sqmovn_qs32()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00173">arm_compute::sqmul_qs16()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00161">arm_compute::sqmul_qs8()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00040">arm_compute::sqshl_qs16()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00032">arm_compute::sqshl_qs8()</a>, <a class="el" href="_fixed_point_8inl_source.xhtml#l00128">arm_compute::sqsub_qs16()</a>, and <a class="el" href="_fixed_point_8inl_source.xhtml#l00119">arm_compute::sqsub_qs8()</a>.</p>
<div class="fragment"><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;{</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keyword">const</span> <span class="keyword">auto</span> low  = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a><span class="keyword">&gt;</span>(std::numeric_limits&lt;T&gt;::lowest());</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="keyword">const</span> <span class="keyword">auto</span> high = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a><span class="keyword">&gt;</span>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;T&gt;::max</a>());</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(<a class="code" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a>(val, low, high));</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1utility_xhtml_a12c3c62f510452805c289e180ec78bb7"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">arm_compute::utility::clamp</a></div><div class="ttdeci">T clamp(const T &amp;n, const T &amp;lower, const T &amp;upper)</div><div class="ttdoc">Performs clamping among a lower and upper value. </div><div class="ttdef"><b>Definition:</b> <a href="_utility_8h_source.xhtml#l00084">Utility.h:84</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::Channel::U</a></div><div class="ttdoc">Cb/U channel. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00902">FixedPoint.h:902</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0c1a72cd100958036bb59f0625f0613f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;size_t&gt; arm_compute::utility::sort_indices </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform an index sort of a given vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">v</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> to sort</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Sorted index vector. </dd></dl>

<p>Definition at line <a class="el" href="_utility_8h_source.xhtml#l00154">154</a> of file <a class="el" href="_utility_8h_source.xhtml">Utility.h</a>.</p>

<p>Referenced by <a class="el" href="_instruments_stats_8cpp_source.xhtml#l00033">InstrumentsStats::InstrumentsStats()</a>.</p>
<div class="fragment"><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;{</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    std::vector&lt;size_t&gt; idx(v.size());</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    std::iota(idx.begin(), idx.end(), 0);</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    std::sort(idx.begin(), idx.end(),</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;              [&amp;v](<span class="keywordtype">size_t</span> i1, <span class="keywordtype">size_t</span> i2)</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    {</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <span class="keywordflow">return</span> v[i1] &lt; v[i2];</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    });</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">return</span> idx;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1utility.xhtml">utility</a></li>
    <li class="footer">Generated on Wed May 23 2018 11:36:45 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
